<script>
import { edit } from '@/mixins/system'
export default {
  name: 'DingTalk',
  mixins: [edit]
}
</script>

<template>
  <el-dialog
    append-to-body
    :close-on-click-modal="false"
    :before-close="close"
    :visible.sync="show"
    title="钉钉通道设置"
    width="700px"
  >
    <div v-loading="loading" class="custom-dialog-body">
      <el-form
        v-if="form.id && loading === false"
        ref="form"
        :inline="true"
        :model="set"
        size="small"
        label-width="150px"
      >
        <el-form-item
          :rules="[{ required: true, message: '请输入AppKey', trigger: 'blur' }]"
          label="AppKey"
          prop="appKey"
        >
          <el-input v-model="set.appKey" placeholder="请输入AppKey" style="width: 400px;" />
        </el-form-item>
        <el-form-item
          :rules="[{ required: true, message: '请输入AppSecret', trigger: 'blur' }]"
          label="AppSecret"
          prop="appSecret"
        >
          <el-input v-model="set.appSecret" placeholder="请输入应用AgentId" style="width: 400px;" />
        </el-form-item>
        <el-form-item
          :rules="[{ required: true, message: '请输入AgentId', trigger: 'blur' }]"
          label="AgentId"
          prop="agentId"
        >
          <el-input v-model="set.agentId" placeholder="请输入AgentId" style="width: 400px;" />
        </el-form-item>
      </el-form>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button type="text" @click="close">取消</el-button>
      <el-button
        :loading="saveObj"
        type="primary"
        @click="submitCU"
      >保存</el-button>
    </div>
  </el-dialog>
</template>

<style scoped>

</style>
